import request from '@/utils/request'

// 查询收付款单列表
export function listPaymentCheck(query) {
  return request({
    url: '/settle/paymentCheck/list',
    method: 'post',
    data: query
  })
}
// 查询收付款单详细
export function getPaymentCheck(id) {
    return request({
      url: '/settle/paymentCheck/' + id,
      method: 'get'
    })
  }
  
  // 新增收付款单
  export function addPaymentCheck(data) {
    return request({
      url: '/settle/paymentCheck/add',
      method: 'post',
      data: data
    })
  }
  
  // 修改收付款单
  export function updatePaymentCheck(data) {
    return request({
      url: '/settle/paymentCheck/update',
      method: 'post',
      data: data
    })
  }

  // 根据收付款单ID获取应收付单
export function initCheckByPaymentId(id,checkType) {
  return request({
    url: '/settle/paymentCheck/initCheckByPaymentId?id=' + id + '&checkType=' + checkType,
    method: 'post'
  })
}

// 审核核销单
export function auditPaymentCheck(id) {
  return request({
    url: '/settle/paymentCheck/audit/' + id,
    method: 'post'
  })
}


// 撤销核销单 2021 12 14 暂同于删除
export function cancelPaymentCheck(id) {
  return request({
    url: '/settle/paymentCheck/delete/' + id,
    method: 'post'
  })
}